<?php

namespace App\Models\CarModels;

use App\Models\SystemManagement\Employee;
use Illuminate\Database\Eloquent\Model;

class CarTask extends Model
{
    //
    protected $table = 'car_tasks';
    protected $fillable = ['task_name','task_type','task_content','user_id','car_id','task_begin_time','task_end_time',
        'task_level'];

    function user()
    {
        return $this->belongsTo(Employee::class,'user_id');
    }

    function car()
    {
        return $this->belongsTo(CarInfo::class,'car_id')->with('kind');
    }
}
